package com.sdp.irrigation.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author zsp
 * @since 2025-02-05
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("irrigation_eq_log_eq_status")
public class IrrigationEqLogEqStatus extends Model<IrrigationEqLogEqStatus> {

    private static final long serialVersionUID=1L;

    /**
     *  内码
     */
    @TableId("key_id")
    private String keyId;

    /**
     * 设备编号
     */
    @TableField("eq_no")
    private String eqNo;

    /**
     *  设备名称
     */
    @TableField("eq_name")
    private String eqName;

    /**
     * 设备分类
     */
    @TableField("eq_type")
    private String eqType;

    /**
     * 项目编号
     */
    @TableField("project_no")
    private String projectNo;

    /**
     * 机井编号
     */
    @TableField("pw_no")
    private String pwNo;

    /**
     * 田块编号
     */
    @TableField("field_no")
    private String fieldNo;

    /**
     * 设备状态码
     */
    @TableField("dev_status")
    private String devStatus;

    /**
     * 累计用水量
     */
    @TableField("sum_water")
    private BigDecimal sumWater;

    /**
     * 累计用电量
     */
    @TableField("sum_ele")
    private BigDecimal sumEle;

    /**
     * 供电电压
     */
    @TableField("bat_vol")
    private BigDecimal batVol;

    @TableField("gprs_rssi")
    private String gprsRssi;

    @TableField("ua")
    private BigDecimal ua;

    @TableField("ub")
    private BigDecimal ub;

    @TableField("uc")
    private BigDecimal uc;

    @TableField("ia")
    private BigDecimal ia;

    @TableField("ib")
    private BigDecimal ib;

    @TableField("ic")
    private BigDecimal ic;

    /**
     * 总相功率
     */
    @TableField("pt")
    private BigDecimal pt;

    /**
     * 上传时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("upload_time")
    private LocalDateTime uploadTime;

    /**
     * 报文内容
     */
    @TableField("protocol_content")
    private String protocolContent;

    /**
     * 记录生成时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("create_time")
    private LocalDateTime createTime;

    /**
     * 记录更新时间
     */
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField("update_time")
    private LocalDateTime updateTime;


    @Override
    protected Serializable pkVal() {
        return this.keyId;
    }

}
